package com.homeinns.crs;

public class ServiceSoapProxy implements com.homeinns.crs.ServiceSoap {
  private String _endpoint = null;
  private com.homeinns.crs.ServiceSoap serviceSoap = null;
  
  public ServiceSoapProxy() {
    _initServiceSoapProxy();
  }
  
  public ServiceSoapProxy(String endpoint) {
    _endpoint = endpoint;
    _initServiceSoapProxy();
  }
  
  private void _initServiceSoapProxy() {
    try {
      serviceSoap = (new com.homeinns.crs.ServiceLocator()).getServiceSoap();
      if (serviceSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)serviceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)serviceSoap)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (serviceSoap != null)
      ((javax.xml.rpc.Stub)serviceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.homeinns.crs.ServiceSoap getServiceSoap() {
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap;
  }
  
  public boolean sendMessage(com.homeinns.crs.Message msg) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.sendMessage(msg);
  }
  
  public boolean sendMessageYitel(com.homeinns.crs.Message msg) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.sendMessageYitel(msg);
  }
  
  public boolean sendMessageMotel(com.homeinns.crs.Message msg) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.sendMessageMotel(msg);
  }
  
  public boolean sendMessageAuto(com.homeinns.crs.Message msg, java.lang.String auto) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.sendMessageAuto(msg, auto);
  }
  
  public boolean sendMessageGroup(com.homeinns.crs.Message[] msgs) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.sendMessageGroup(msgs);
  }
  
  public boolean startSendMessage() throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.startSendMessage();
  }
  
  public boolean stopSendMessage() throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.stopSendMessage();
  }
  
  public java.lang.Object[] receiveMessage() throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.receiveMessage();
  }
  
  public java.lang.Object[] returnThdStatus() throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.returnThdStatus();
  }
  
  public java.lang.Object[] returnQueueStatus() throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.returnQueueStatus();
  }
  
  public void getSequenceNo() throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    serviceSoap.getSequenceNo();
  }
  
  public boolean updatecCrs_resvMsgFlag(int orderno) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.updatecCrs_resvMsgFlag(orderno);
  }
  
  public boolean updatecCrs_resvMsgFlag_MT(int orderno) throws java.rmi.RemoteException{
    if (serviceSoap == null)
      _initServiceSoapProxy();
    return serviceSoap.updatecCrs_resvMsgFlag_MT(orderno);
  }
  
  
}